/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package doan.quanlycanbo.portlet.service;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.util.ClassLoaderProxy;

/**
 * The utility for the chucvu local service. This utility wraps {@link doan.quanlycanbo.portlet.service.impl.chucvuLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
 *
 * <p>
 * Never modify this class directly. Add custom service methods to {@link doan.quanlycanbo.portlet.service.impl.chucvuLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
 * </p>
 *
 * <p>
 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
 * </p>
 *
 * @author Nguyen Tuan Vinh
 * @see chucvuLocalService
 * @see doan.quanlycanbo.portlet.service.base.chucvuLocalServiceBaseImpl
 * @see doan.quanlycanbo.portlet.service.impl.chucvuLocalServiceImpl
 * @generated
 */
public class chucvuLocalServiceUtil {
	/**
	* Adds the chucvu to the database. Also notifies the appropriate model listeners.
	*
	* @param chucvu the chucvu to add
	* @return the chucvu that was added
	* @throws SystemException if a system exception occurred
	*/
	public static doan.quanlycanbo.portlet.model.chucvu addchucvu(
		doan.quanlycanbo.portlet.model.chucvu chucvu)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().addchucvu(chucvu);
	}

	/**
	* Creates a new chucvu with the primary key. Does not add the chucvu to the database.
	*
	* @param machucvu the primary key for the new chucvu
	* @return the new chucvu
	*/
	public static doan.quanlycanbo.portlet.model.chucvu createchucvu(
		long machucvu) {
		return getService().createchucvu(machucvu);
	}

	/**
	* Deletes the chucvu with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param machucvu the primary key of the chucvu to delete
	* @throws PortalException if a chucvu with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static void deletechucvu(long machucvu)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		getService().deletechucvu(machucvu);
	}

	/**
	* Deletes the chucvu from the database. Also notifies the appropriate model listeners.
	*
	* @param chucvu the chucvu to delete
	* @throws SystemException if a system exception occurred
	*/
	public static void deletechucvu(
		doan.quanlycanbo.portlet.model.chucvu chucvu)
		throws com.liferay.portal.kernel.exception.SystemException {
		getService().deletechucvu(chucvu);
	}

	/**
	* Performs a dynamic query on the database and returns the matching rows.
	*
	* @param dynamicQuery the dynamic query to search with
	* @return the matching rows
	* @throws SystemException if a system exception occurred
	*/
	@SuppressWarnings("rawtypes")
	public static java.util.List dynamicQuery(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().dynamicQuery(dynamicQuery);
	}

	/**
	* Performs a dynamic query on the database and returns a range of the matching rows.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param dynamicQuery the dynamic query to search with
	* @param start the lower bound of the range of model instances to return
	* @param end the upper bound of the range of model instances to return (not inclusive)
	* @return the range of matching rows
	* @throws SystemException if a system exception occurred
	*/
	@SuppressWarnings("rawtypes")
	public static java.util.List dynamicQuery(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
		int end) throws com.liferay.portal.kernel.exception.SystemException {
		return getService().dynamicQuery(dynamicQuery, start, end);
	}

	/**
	* Performs a dynamic query on the database and returns an ordered range of the matching rows.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param dynamicQuery the dynamic query to search with
	* @param start the lower bound of the range of model instances to return
	* @param end the upper bound of the range of model instances to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching rows
	* @throws SystemException if a system exception occurred
	*/
	@SuppressWarnings("rawtypes")
	public static java.util.List dynamicQuery(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
		int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService()
				   .dynamicQuery(dynamicQuery, start, end, orderByComparator);
	}

	/**
	* Counts the number of rows that match the dynamic query.
	*
	* @param dynamicQuery the dynamic query to search with
	* @return the number of rows that match the dynamic query
	* @throws SystemException if a system exception occurred
	*/
	public static long dynamicQueryCount(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().dynamicQueryCount(dynamicQuery);
	}

	/**
	* Gets the chucvu with the primary key.
	*
	* @param machucvu the primary key of the chucvu to get
	* @return the chucvu
	* @throws PortalException if a chucvu with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static doan.quanlycanbo.portlet.model.chucvu getchucvu(long machucvu)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		return getService().getchucvu(machucvu);
	}

	/**
	* Gets a range of all the chucvus.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of chucvus to return
	* @param end the upper bound of the range of chucvus to return (not inclusive)
	* @return the range of chucvus
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<doan.quanlycanbo.portlet.model.chucvu> getchucvus(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().getchucvus(start, end);
	}

	/**
	* Gets the number of chucvus.
	*
	* @return the number of chucvus
	* @throws SystemException if a system exception occurred
	*/
	public static int getchucvusCount()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().getchucvusCount();
	}

	/**
	* Updates the chucvu in the database. Also notifies the appropriate model listeners.
	*
	* @param chucvu the chucvu to update
	* @return the chucvu that was updated
	* @throws SystemException if a system exception occurred
	*/
	public static doan.quanlycanbo.portlet.model.chucvu updatechucvu(
		doan.quanlycanbo.portlet.model.chucvu chucvu)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().updatechucvu(chucvu);
	}

	/**
	* Updates the chucvu in the database. Also notifies the appropriate model listeners.
	*
	* @param chucvu the chucvu to update
	* @param merge whether to merge the chucvu with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
	* @return the chucvu that was updated
	* @throws SystemException if a system exception occurred
	*/
	public static doan.quanlycanbo.portlet.model.chucvu updatechucvu(
		doan.quanlycanbo.portlet.model.chucvu chucvu, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().updatechucvu(chucvu, merge);
	}

	public static doan.quanlycanbo.portlet.model.chucvu getChucvu(long idChucvu)
		throws com.liferay.portal.kernel.exception.SystemException,
			doan.quanlycanbo.portlet.NoSuchchucvuException {
		return getService().getChucvu(idChucvu);
	}

	public static java.util.List<doan.quanlycanbo.portlet.model.chucvu> getAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().getAll();
	}

	public static java.util.List<doan.quanlycanbo.portlet.model.chucvu> getChucvuByGroup(
		long groupId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().getChucvuByGroup(groupId);
	}

	public static java.util.List<doan.quanlycanbo.portlet.model.chucvu> getChucvuByG_L(
		long groupId, java.lang.String languageId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().getChucvuByG_L(groupId, languageId);
	}

	public static doan.quanlycanbo.portlet.model.chucvu addChucVu(
		doan.quanlycanbo.portlet.model.chucvu cv1, long userId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getService().addChucVu(cv1, userId);
	}

	public static doan.quanlycanbo.portlet.model.chucvu updateChucVu(
		long machucvu, java.lang.String tenchucvu)
		throws com.liferay.portal.kernel.exception.SystemException,
			doan.quanlycanbo.portlet.NoSuchchucvuException {
		return getService().updateChucVu(machucvu, tenchucvu);
	}

	public static void deleteChucVu(long machucvu)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException,
			doan.quanlycanbo.portlet.NoSuchchucvuException {
		getService().deleteChucVu(machucvu);
	}

	public static void deleteChucVu(doan.quanlycanbo.portlet.model.chucvu cv)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		getService().deleteChucVu(cv);
	}

	public static void clearService() {
		_service = null;
	}

	public static chucvuLocalService getService() {
		if (_service == null) {
			Object obj = PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
					chucvuLocalService.class.getName());
			ClassLoader portletClassLoader = (ClassLoader)PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
					"portletClassLoader");

			ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(obj,
					portletClassLoader);

			_service = new chucvuLocalServiceClp(classLoaderProxy);

			ClpSerializer.setClassLoader(portletClassLoader);
		}

		return _service;
	}

	public void setService(chucvuLocalService service) {
		_service = service;
	}

	private static chucvuLocalService _service;
}